
import time
import datetime
import pandas

def test1():
    date_str = "31.12.2020"
    # date_str = "31.12.2020"
    # timeArray = time.strptime(date_str, r"%d.%m.%Y")
    # print("timeArray:", timeArray)
    datetimeArray = datetime.datetime.strptime(date_str, "%d.%m.%Y")
    print("datetimeArray:", datetimeArray)
    print("datetimeArray.date:", datetimeArray.day)

if __name__ == "__main__":
    test1()
